package com.lxx.modules.erp.entity;

import com.lxx.common.BaseEntity;
import java.util.Date;

/**
 * 设备信息 实体类
 *
 * @author lxx
 */
public class Equipment extends BaseEntity<Integer>  {
    /** 设备编号 */
    private String no;

    /** 设备名称 */
    private String name;

    /** 设备数量 */
    private Integer num;

    /** 设备描述 */
    private String desp;

    /** 采购时间 */
    private Date perchaseTime;

    /**
     * 返回 设备编号
     *
     * @return 设备编号
     */
    public String getNo() {
        return no;
    }

    /**
     * 设置 设备编号
     *
     * @param no 设备编号
     */
    public void setNo(String no) {
        this.no = no == null ? null : no.trim();
    }

    /**
     * 返回 设备名称
     *
     * @return 设备名称
     */
    public String getName() {
        return name;
    }

    /**
     * 设置 设备名称
     *
     * @param name 设备名称
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * 返回 设备数量
     *
     * @return 设备数量
     */
    public Integer getNum() {
        return num;
    }

    /**
     * 设置 设备数量
     *
     * @param num 设备数量
     */
    public void setNum(Integer num) {
        this.num = num;
    }

    /**
     * 返回 设备描述
     *
     * @return 设备描述
     */
    public String getDesp() {
        return desp;
    }

    /**
     * 设置 设备描述
     *
     * @param desp 设备描述
     */
    public void setDesp(String desp) {
        this.desp = desp == null ? null : desp.trim();
    }

    /**
     * 返回 采购时间
     *
     * @return 采购时间
     */
    public Date getPerchaseTime() {
        return perchaseTime;
    }

    /**
     * 设置 采购时间
     *
     * @param perchaseTime 采购时间
     */
    public void setPerchaseTime(Date perchaseTime) {
        this.perchaseTime = perchaseTime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", no=").append(no);
        sb.append(", name=").append(name);
        sb.append(", num=").append(num);
        sb.append(", desp=").append(desp);
        sb.append(", perchaseTime=").append(perchaseTime);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Equipment other = (Equipment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getNo() == null ? other.getNo() == null : this.getNo().equals(other.getNo()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum()))
            && (this.getDesp() == null ? other.getDesp() == null : this.getDesp().equals(other.getDesp()))
            && (this.getPerchaseTime() == null ? other.getPerchaseTime() == null : this.getPerchaseTime().equals(other.getPerchaseTime()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getNo() == null) ? 0 : getNo().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode());
        result = prime * result + ((getDesp() == null) ? 0 : getDesp().hashCode());
        result = prime * result + ((getPerchaseTime() == null) ? 0 : getPerchaseTime().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        return result;
    }
}